package com.eight.vote.service;

import com.eight.vote.pojo.VMessage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.eight.vote.pojo.VOption;
import com.eight.vote.util.Result;
import com.eight.vote.vo.VoteVo;
import com.eight.vote.vo.GetVoteVo;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 点点星言
 * @since 2022-10-16
 */
public interface VMessageService extends IService<VMessage> {

    /**
     * 获取展示在首页的热门的投票活动
     * @return
     */
    Result getHotVote(Integer pageNum,Integer pageSize);

    /**
     * 添加一个投票信息
     * @param voteVo
     * @return
     */
    Result addVote(VoteVo voteVo);

    /**
     * 用户个人进行选项投票
     * @param option
     * @return
     */
    Result userAddVote(VOption option);

    /**
     * 检索投票
     * @param keyword
     * @return
     */
    Result searchVote(String keyword,Integer pageNum,Integer pageSize);

    /**
     * 根据id获取投票信息
     * @param getVoteVo
     * @return
     */
    Result getVoteById(GetVoteVo getVoteVo);

    Result getVoteByUserId(Integer pageNum,Integer pageSize);

    Result deleteMessage(Long msgId);
}
